package cn.biplam.back.operator.ddl.db2sql;

import java.sql.Connection;

import cn.biplam.back.jda.Jda;
import cn.biplam.common.client.DbResource;
import cn.biplam.common.wrapper.ErrorMessage;

/**
 * 功能		获取数据库连接
 * @author 	WangSong
 * @create 	2009-3-19 上午10:33:36
 * @version 1.0
 */
public class Db2SqlConnection {
	
	/**
	 * 功能   取数据库连接
	 * @return Connection 数据库连接
	 * @throws ErrorMessage
	 */
	public static Connection get(DbResource mDbResource) throws ErrorMessage{
		
		Connection conn = null;
		
		Jda mJda = new Jda(mDbResource);
		conn = mJda.getConn();
		
		return conn;
	}
	
	public static Jda getJda(DbResource mDbResource) throws ErrorMessage{
		Jda mJda = new Jda(mDbResource);
		return mJda;
	}
}
